package  com.songyl.patternLearn.AdapterPattern;

import java.util.ArrayList;
import java.util.List;

abstract class HighLevelPlayer {

     public String level;

     public float HP;

     //游戏状态
     public boolean isAlive=true;

     List<Float> HPList;

     int reliveTime=0;

     protected HighLevelPlayer() {
          HPList = new ArrayList<>();
     }

     public String getLevel() {
          return level;
     }

     public void setLevel(String level) {
          this.level = level;
     }

     public float getHP() {
          return HP;
     }

     public void setHP(float HP){
          this.HP=HP;
          this.isAlive=HP>0;
     }
    public void addHP(float HP){
         this.HPList.add(HP);
    }


     public boolean isAlive() {
          return HP>0;
     }

     public void setAlive(boolean alive) {
          isAlive = alive;
     }


     public int getReliveTime() {
          return reliveTime;
     }

     public void setReliveTime(int reliveTime) {
          this.reliveTime = reliveTime;
     }

     boolean relive(){return false;}

}
